function simpleForm(){
	var fpanel = new Ext.form.FormPanel({
		title:"用户基本信息",
		labelAlign:"right",
		width:400,
		height:500,
		//fileUpload:true,
		buttons:[{text:"提交",handler:function(){
			//要对表单里面的东西进行操作，需要用到BasicForm类中的方法
			//要得到一个BasicForm的实例，需要调用FormPanel对象上面的getForm方法，fp.form可得到BasicForm对象
			fpanel.getForm().submit({url:"reg.jsp",success:function(){
				Ext.Msg.alert("提交","数据保存成功！");
			} });
		}},{text:"重置",handler:function(){
			Ext.Msg.alert("提示",fpanel.form.findField("name").getValue());
			fpanel.form.reset();
		}},{text:"设值",handler:function(){
			fpanel.form.setValues({name:"黎明"});
		}}],
		items:[{
			xtype:"textfield",
			fieldLabel:"姓名",
			name:"name"
		},{
			xtype:"textfield",
			fieldLabel:"密码",
			name:"password"
		},{
			xtype:"datefield",
			fieldLabel:"出生日期",
			name:"bornDate"
		},{
			xtype:"textarea",
			fieldLabel:"简介",
			name:"intro"
		}]
	});
	fpanel.render(document.body);
}


Ext.onReady(simpleForm);